/**
@author		Jong Min, Lee
@date		  02/05/2014
@breif		

copyright(c) Tae Young Soft. All right reserved. 2014
*/
#pragma once

/**
@brief  Monitor Resolution Type
*/
enum MonitorResolutionType
{
  MonitorResolution_Normal  = 100,
  MonitorResolution_3M      = 120,
  MonitorResolution_5M      = 160
};

/**
@brief		series matching status
*/
enum SeriesMatchStatus
{
  SeriesMatchStatus_FirstInvalid,
  SeriesMatchStatus_None,
  SeriesMatchStatus_Match,
  SeriesMatchStatus_NoMatch,
  SeriesMatchStatus_NoImage,
  SeriesMatchStatus_LastInvalid
};

/**
@brief two dimension layout
*/
class C2DLayout
{
public:
  /**
  @brief		default constructor
  */
  C2DLayout()
  {
    theRows = theCols = 0;
  }

  /**
  @brief	constructor
  @param	rows the number of row	
  @param  cols the number of cols
  */
  C2DLayout(const int rows, const int cols)
    : theRows(rows), theCols(cols)
  {}

  /**
  @brief		get count
  */
  inline int getCount() const
  {
    return (theRows * theCols);
  }

  BOOL operator==(const C2DLayout& layout) const
  {
    return isEqual(layout);
  }

  BOOL operator!=(const C2DLayout& layout) const
  {
    return !isEqual(layout);
  }

  /**
  @brief		check whether layout is equal to this
  @return		TRUE if layout is equal to this, FALSE if not
  */
  BOOL isEqual(const C2DLayout& layout) const
  {
    return (theRows == layout.theRows &&
            theCols == layout.theCols);
  }

  /**
  @brief		convert to string
  */
  inline CString convertToString() const
  {
    CString str;
    str.Format(_T("%2d X %-2d"), theRows, theCols);
    str.TrimLeft();
    str.TrimRight();
    return str;
  }

  inline void convertFromString(const CString& str)
  {
    theRows = _ttoi(str.Left(2));
    theCols = _ttoi(str.Right(2));
  }

public:
  //rows
  int theRows;

  //columns
  int theCols;
};

typedef struct tagFontProperty
{
  COLORREF color;

  int      iSize;

  CString  strFaceName;

  int      iBold;

  int      iItalic;
}CFontProperty;
